﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kugar.Core.Security.Permission
{
    public class NoPermissionException : Exception
    {
        private const string errorStr = @"当前用户不存在{0}权限";

        public NoPermissionException(PermissionInfoAttribute permissionInfo)
            : base(string.Format(errorStr, permissionInfo.ActionName))
        {
            PermissionInfo = permissionInfo;
        }

        public PermissionInfoAttribute PermissionInfo { get; protected set; }
    }
}
